<template>
  <div class="block_main blue-tit">
    <!-- <div class="nytit">首页&gt;通知/督办</div> -->

    <el-row style="padding-top: 10px" v-loading="loading">
  
      <el-col :span="24" style="padding:0 5px;margin-top:30px;">
        <el-card>
          <el-form ref="form" style="width:50%; margin:20px;" :model="EditForm" label-width="150px" size="small">
            <el-form-item label="诉求分类">
              <el-select v-model="EditForm.group" placeholder="诉求分类">
                <el-option v-for="(item,index) in MsgGroup" :label="item.name" :value="item.id" :key="index"></el-option>
              </el-select>
            </el-form-item>
          </el-form>

          <select-menu :sname="sname" :options="options" :dynamicValidateForm="dynamicValidateForm" v-on:changename="update"></select-menu><!--市级部门-->
          <select-menu :sname="sname2" :options="optionsArea" :dynamicValidateForm="dynamicValidateFormArea" v-on:changename="updateArea"></select-menu><!--县长热线-->
        </el-card>

      </el-col>
    </el-row>

  </div>
</template>
<script>
  import actionurl from '@/assets/js/actionurl'
  import selectMenu from '@/components/selectMenu.vue'
  export default {
    name: 'questionAdd',
    components:{
      selectMenu
    },
    data() {
      return {
        loading:false,
        MsgGroup:[],
        cityArr:[],
        countyArr:[],
        filePath:'',
        FileName:'',
        sname:'市级部门',
        sname2:'县长热线',
        EditForm: {
          company: '',
          resource:'0',
          group:'6'

        },
        dynamicValidateForm: {
          domains: [{
            value: '运维',
            id:'0'
          }],
          selectList: [{
            value: '选择',
            id: '0'
          }]
        },
        options: [],
        dynamicValidateFormArea: {
          domains: [{
            value: '河北',
            id:'0'
          }],
          selectList: [{
            value: '',
            id: ''
          }]
        },
        optionsArea:[],
       
      }
    },
    created() {
      this.GetTargetList();
      this.GetMsgGroup();
    },
   
    methods: {
      update(name){//获取市级增加的菜单数组
        this.cityArr = name;
      
      },
      updateArea(name){//获取区县级增加的菜单数组
        this.countyArr = name;
      },
     
      
      GetTargetList(){//获取区县以及市级下拉菜单获取
        var _this = this;
        actionurl.targetListByType({
          }, function(re) {

            _this.options = re.data.city;
            _this.optionsArea = re.data.county;
  
        });
      },
      GetMsgGroup(){
        var _this = this;
        actionurl.MessageGroup({
            mesgroup:1,//0-面对面等分类 1-八大类 
            fid:1
          }, function(re) {
            console.log(re);
            _this.MsgGroup=re.data;
           
  
        });
      },
    }
  }


</script>
<style scoped lang="scss">
 

</style>
